package com.shababeach.travel.repository;


import com.shababeach.travel.entity.Location;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.domain.Specification;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * 位置信息Mapper接口
 */
@Repository
public interface LocationRepository extends JpaRepository<Location, Integer> {
    List<Location> findByStatusAndIsRecommend(Integer status, Integer isRecommend);

    List<Location> findByTypeId(Integer typeId);

    Page<Location> findAll(Specification<Location> spec, Pageable pageable);
}